#!/usr/bin/gnuplot
reset

set terminal wxt size 1600,900 enhanced font 'Verdana,8' persist

set xlabel "time (milliseconds)"

set format x "%.1s 10^%S"

set yrange [0:2000]

set ylabel "number"

set key reverse Left outside
set grid

set style data lines

set multiplot layout 2, 2

set title "File 1 (popular) evolution"

set size 0.5, 0.5

set style line 1 linecolor rgb "green" linetype 1 linewidth 4
set style line 2 linecolor rgb "red" linetype 1 linewidth 4
set style line 3 linecolor rgb "navy" linetype 1 linewidth 4

#Rule: 1:((FILE_NUM-1)*3 + 2
plot "gnuplot_output-ex3cacheOFF.dat" using 1:2 title "seeders" with lines linestyle 1, \
"" using 1:3 title "leechers" with lines linestyle 2, \
"" using 1:4 title "not interested" with lines linestyle 3

set title "File 40 (common) evolution"

set size 0.5, 0.5

plot "gnuplot_output-ex3cacheOFF.dat" using 1:119 title "seeders" with lines linestyle 1, \
"" using 1:120 title "leechers" with lines linestyle 2, \
"" using 1:121 title "not interested" with lines linestyle 3

set title "File 80 (rare) evolution"

set size 0.5, 0.5

plot "gnuplot_output-ex3cacheOFF.dat" using 1:239 title "seeders" with lines linestyle 1, \
"" using 1:240 title "leechers" with lines linestyle 2, \
"" using 1:241 title "not interested" with lines linestyle 3

set title "File 100 (trending) evolution"

set size 0.5, 0.5

plot "gnuplot_output-ex3cacheOFF.dat" using 1:299 title "seeders" with lines linestyle 1, \
"" using 1:300 title "leechers" with lines linestyle 2, \
"" using 1:301 title "not interested" with lines linestyle 3

unset multiplot
#
